package com.castle.fortress.admin.cms.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
 * cms内容管理表 实体类
 *
 * @author castle
 * @since 2022-03-10
 */
@Data
@ApiModel(value = "cmsArticle对象", description = "cms内容管理表")
public class CmsArticleDto implements Serializable {
	private static final long serialVersionUID = 1L;
	@ApiModelProperty(value = "主键")
	@JsonProperty("id")
	private Long id;
	@ApiModelProperty(value = "标题")
	@JsonProperty("title")
	private String title;
	@ApiModelProperty(value = "作者")
	@JsonProperty("author")
	private String author;
	@ApiModelProperty(value = "来源")
	@JsonProperty("source")
	private String source;
	@ApiModelProperty(value = "内容")
	@JsonProperty("contents")
	private String contents;
	@ApiModelProperty(value = "摘要")
	@JsonProperty("info")
	private String info;
	@ApiModelProperty(value = "关键字")
	@JsonProperty("keywords")
	private String keywords;
	@ApiModelProperty(value = "缩略图")
	@JsonProperty("picname")
	private String picname;
	@ApiModelProperty(value = "发布人")
	@JsonProperty("publisher")
	private String publisher;
	@DateTimeFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@JsonFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@ApiModelProperty(value = "发布时间")
	@JsonProperty("pubdate")
	private Date pubdate;
	@ApiModelProperty(value = "访问地址")
	@JsonProperty("url")
	private String url;
	@ApiModelProperty(value = "浏览次数")
	@JsonProperty("click")
	private Integer click;
	@ApiModelProperty(value = "权重排序")
	@JsonProperty("sort")
	private Integer sort;
	//状态：0：草稿 ;1  待审核 ;2  已发布 ;3  审核未通过 ; 7 回收站
	@ApiModelProperty(value = "状态")
	@JsonProperty("status")
	private Integer status;
	@JsonSerialize(using = ToStringSerializer.class)
	@ApiModelProperty(value = "创建人")
	@JsonProperty("createUser")
	private Long createUser;
	@DateTimeFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@JsonFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@ApiModelProperty(value = "创建时间")
	@JsonProperty("createTime")
	private Date createTime;
	@JsonSerialize(using = ToStringSerializer.class)
	@ApiModelProperty(value = "修改人")
	@JsonProperty("updateUser")
	private Long updateUser;
	@DateTimeFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@JsonFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@ApiModelProperty(value = "修改时间")
	@JsonProperty("updateTime")
	private Date updateTime;
	@JsonSerialize(using = ToStringSerializer.class)
	@ApiModelProperty(value = "审核人")
	@JsonProperty("auditer")
	private Long auditer;
	@DateTimeFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@JsonFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@ApiModelProperty(value = "审核时间")
	@JsonProperty("auditdate")
	private Date auditdate;
	@ApiModelProperty(value = "审核意见")
	@JsonProperty("auditop")
	private String auditop;
	@ApiModelProperty(value = "回收站 1;否 2")
	@JsonProperty("isDeleted")
	private Integer isDeleted;
	@JsonSerialize(using = ToStringSerializer.class)
	@ApiModelProperty(value = "栏目")
	@JsonProperty("channelId")
	private Long channelId;
	@ApiModelProperty(value = "创建者姓名")
	@JsonProperty("createUserName")
	private String createUserName;
	@JsonProperty("channelIdName")
	private String channelIdName;

	//扩展的字段值
	@JsonProperty("colData")
	private Map<String,Object> colData;
	@JsonSerialize(using = ToStringSerializer.class)
	@ApiModelProperty(value = "模型id")
	@JsonProperty("modelId")
	private Long modelId;
	@ApiModelProperty(value = "文章属性")
	@JsonProperty("attr")
	private List<Long> attr;
	@ApiModelProperty(value = "文章标签")
	@JsonProperty("tags")
	private List<Object> tags;
	@ApiModelProperty(value = "文章所属专题")
	@JsonProperty("special")
	private List<Long> special;
	@ApiModelProperty(value = "是否审核")
	@JsonProperty("auditflag")
	private Boolean auditflag;
	@ApiModelProperty(value = "文章属性列表 用于标签")
	@JsonProperty("attrInfos")
	private List<CmsSysTagDto> attrInfos;
	@ApiModelProperty(value = "文章标签列表 用于标签")
	@JsonProperty("tagInfos")
	private List<CmsCustTagDto> tagInfos;

	@DateTimeFormat(
			pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@JsonFormat(
			pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@ApiModelProperty(value = "发布时间开始")
	@JsonProperty("pubdateStart")
	private Date pubdateStart;
	@DateTimeFormat(
			pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@JsonFormat(
			pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@ApiModelProperty(value = "发布时间结束")
	@JsonProperty("pubdateEnd")
	private Date pubdateEnd;
	@ApiModelProperty(value = "文章过滤标签")
	@JsonProperty("queryTags")
	private String queryTags;

}
